﻿using FunctionScope.ViewModels;
using FunctionScope.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace FunctionScope
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            //Create view model. Can use DI later.
            Trace2DViewModel trace2dViewModel = new Trace2DViewModel();
            PresetsViewModel presetViewModel = new PresetsViewModel();
            presetViewModel.CurrentSettings = trace2dViewModel;

            //Glue VM to Views
            sfv_xAxis.DataContext = trace2dViewModel.XFunction;
            sfv_yAxis.DataContext = trace2dViewModel.YFunction;

            psv_PlotSettingsView.DataContext = trace2dViewModel.PlotSettings;

            trc_Trace2D.DataContext = trace2dViewModel.PlotSettings;

            psv_PresetsView.DataContext = presetViewModel;







        }
    }
}
